package com.wanxi.test;

import java.util.ArrayList;

public class MyArrayList {
    public static void main(String[] args) {
        ArrayList<Student> list = new ArrayList<Student>();
        list.add(new Student("张三1", 22));
        Student student = new Student("张三2", 22);
        list.add(student);
        list.add(1, new Student("张三3", 22));
        System.out.println(list);
//        list.remove(student);
//        list.remove(1);
        list.set(1,new Student("张三4", 22));
        System.out.println(list);
        Student student1 = list.get(0);
        System.out.println(student1);
        System.out.println(list.size());
    }
}
